home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / SgArc.z / SgArc
Text File  |  1998-10-30  |  15KB  |  331 lines

  1.  
  2.  
  3.  
  4.      SSSSggggAAAArrrrcccc((((3333XXXX))))                 UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                 SSSSggggAAAArrrrcccc((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           SSSSggggAAAArrrrcccc - Arc widget designed for use with SgGraph.
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           #include <Xm/Xm.h> #include <Sgm/Graph.h> #include
  13.           <Sgm/Arc.h>
  14.  
  15.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  16.           This page documents the version of Sgm that accompanies
  17.           Motif 2.1.
  18.  
  19.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.           The SgArc widget is a special widget that resembles a gadget
  21.           in that it has no window of its own. It draws in the window
  22.           of the SgGraph widget, with cooperation of the Graph widget.
  23.           The Arc widget can only be used with the Graph widget.  An
  24.           arc may be undirected, directed, or bidirected.
  25.  
  26.         CCCCLLLLAAAASSSSSSSSEEEESSSS
  27.           The Arc widget inherits behavior from the Core widget class.
  28.  
  29.           Its class pointer is ssssggggAAAArrrrccccWWWWiiiiddddggggeeeettttCCCCllllaaaassssssss
  30.  
  31.           Its class name is SSSSggggAAAArrrrcccc.
  32.  
  33.      AAAARRRRCCCC RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS
  34.           The Arc widget defines a set of resource types used by the
  35.           programmer to specify the data for the arc.  These resources
  36.           are used to set attributes for arcs when specifying node
  37.           parent-child relationships.  The following table contains
  38.           the set of resources defined by the Arc widget. To specify
  39.           any of these resources within the .Xdefaults file, simply
  40.           drop the XmN prefix from the resource name.
  41.  
  42.                                  SSSSggggAAAArrrrcccc RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  43.      NNNNaaaammmmeeee                  CCCCllllaaaassssssss           TTTTyyyyppppeeee              DDDDeeeeffffaaaauuuulllltttt      AAAAcccccccceeeessssssss
  44.      ___________________________________________________________________________
  45.      XmNto                 XmCTo           XmRPointer        NULL         CSG
  46.      XmNfrom               XmCFrom         XmRPointer        NULL         CSG
  47.      XmNtoPosition         XmCPosition     XmRShort          50           CSG
  48.      XmNfromPosition       XmCPosition     XmRShort          50           CSG
  49.      XmNfromSide           XmCSide         XmRShort          XmRIGHT      CSG
  50.      XmNtoSide             XmCSide         XmRShort          XmLEFT       CSG
  51.      XmNarcDirection       XmCDirection    XmRArcDirection   XmDIRECTED   CSG
  52.      XmNforeground         XmCForeground   Pixel             "Black"      CSG
  53.      XmNhighlight          XmCHighlight    Boolean           "False"      CSG
  54.      XmNfontList           XmCFontList     FontList          "Fixed       "
  55.      XmNlabelString        XmCXmString     XmString          dynamic      CSG
  56.      XmNmapLabel           XmCBoolean      Boolean           "FALSE"      CSG
  57.      XmNarcWidth           XmCArcWidth     int               0            CSG
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      SSSSggggAAAArrrrcccc((((3333XXXX))))                 UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                 SSSSggggAAAArrrrcccc((((3333XXXX))))
  71.  
  72.  
  73.  
  74.      XmNstyle              XmCStyle        int               LineSolid    CSG
  75.      XmNcapStyle           XmCapStyle      int               CapButt      CSG
  76.      XmNdashes             XmCDashes       int               4            CSG
  77.      XmNdashOffset         XmCDashOffset   int               0            CSG
  78.      XmNarmCallback        XmCCallback     Pointer           NULL         C
  79.      XmNdisarmCallback     XmCCallback     Pointer           NULL         C
  80.      XmNactivateCallback   XmCCallback     Pointer           NULL         C
  81.      XmNatribute           XmCAttribute    Atom              NULL         C
  82.      XmNuserData           XmCUserData     Pointer           NULL         CSG
  83.  
  84.  
  85.           XXXXmmmmNNNNttttoooo
  86.                The widget this arc points to.
  87.  
  88.  
  89.           XXXXmmmmNNNNffffrrrroooommmm
  90.                The widget this arc points from.
  91.  
  92.  
  93.           XXXXmmmmNNNNaaaarrrrccccWWWWiiiiddddtttthhhh
  94.                The width, in pixels, of the line drawn for the arc.
  95.                Zero means to draw using the server's fastest algorithm
  96.                with a line width of one pixel.
  97.  
  98.           XXXXmmmmNNNNssssttttyyyylllleeee
  99.                Specifies whether the line is solid in foreground,
  100.                dashed in foreground, or alternating foreground and
  101.                background. Possible values are LineSolid (the
  102.                default), LineOnOffDash, or LineDoubleDash.
  103.  
  104.           XXXXmmmmNNNNccccaaaappppSSSSttttyyyylllleeee
  105.                Controls the appearance of the ends of a line. This
  106.                characteristic affects the ends of lines drawn in
  107.                dashes, and both ends of each dash in some cases.
  108.                Possible values are CapNotLast, CapButt (the default),
  109.                CapRound, and CapProjecting.
  110.  
  111.           XXXXmmmmNNNNddddaaaasssshhhheeeessss
  112.                Specifies the length of the dashes for custom-designed
  113.                dashed lines. The default (4) is equivalent to the list
  114.                {4,4} (a dash of 4 pixels, followed by a space of 4
  115.                pixels).
  116.  
  117.           XXXXmmmmNNNNddddaaaasssshhhhOOOOffffffffsssseeeetttt
  118.                Specifies the starting point of the dash pattern, from
  119.                the parent node, for dashed lines.
  120.  
  121.           XXXXmmmmNNNNllllaaaabbbbeeeellllSSSSttttrrrriiiinnnngggg
  122.                This resource specifies a compound string which will be
  123.                displayed with the arc, if the XmNmapLabel resource is
  124.                true. If no labelString is given, the widget defaults
  125.                to using the widget name as the label.
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      SSSSggggAAAArrrrcccc((((3333XXXX))))                 UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                 SSSSggggAAAArrrrcccc((((3333XXXX))))
  137.  
  138.  
  139.  
  140.           XXXXmmmmNNNNmmmmaaaappppLLLLaaaabbbbeeeellll
  141.                If true (the default), the label, if any, will be
  142.                displayed.
  143.  
  144.           XXXXmmmmNNNNaaaarrrrccccDDDDiiiirrrreeeeccccttttiiiioooonnnn
  145.                If XmDIRECTED, will display an arrow head on the child
  146.                end, if XmBIDIRECTED will display an arrow head on both
  147.                ends, otherwise no arrow head is displayed.
  148.  
  149.           XXXXmmmmNNNNffffoooorrrreeeeggggrrrroooouuuunnnndddd
  150.                Color in which the arc and its label will be drawn.
  151.  
  152.           XXXXmmmmNNNNffffoooonnnnttttLLLLiiiisssstttt
  153.                Font used to write the label with when XmNmapLabel is
  154.                true.
  155.  
  156.           XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk
  157.  
  158.           XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk
  159.  
  160.           XXXXmmmmNNNNaaaaccccttttiiiivvvvaaaatttteeeeCCCCaaaallllllllbbbbaaaacccckkkk
  161.                These callbacks are equivalent to the pushbutton
  162.                callbacks of the same name.
  163.  
  164.           XXXXmmmmNNNNffffrrrroooommmmSSSSiiiiddddeeee
  165.                If the parent graph widget's XmNdrawMode resource is
  166.                set to XmPOSITION_PROPORTIONAL, this resource
  167.                determines the side of the "from" node to which this
  168.                arc is attached. Possible values are XmLEFT, XmRIGHT,
  169.                XmTOP, and XmBOTTOM.
  170.  
  171.           XXXXmmmmNNNNffffrrrroooommmmPPPPoooossssiiiittttiiiioooonnnn
  172.                If the parent graph widget's XmNdrawMode resource is
  173.                set to XmPOSITION_PROPORTIONAL, this resource
  174.                determines the position of the arc at the point it
  175.                leaves the "from" node. Values are given in percentages
  176.                of the relevant node size, and can range from 0-100.
  177.  
  178.           XXXXmmmmNNNNttttooooSSSSiiiiddddeeee
  179.                If the parent graph widget's XmNdrawMode resource is
  180.                set to XmPOSITION_PROPORTIONAL, this resource
  181.                determines the side of the "to" node to which this arc
  182.                is attached. Possible values are XmLEFT, XmRIGHT,
  183.                XmTOP, and XmBOTTOM.
  184.  
  185.           XXXXmmmmNNNNttttooooPPPPoooossssiiiittttiiiioooonnnn
  186.                If the parent graph widget's XmNdrawMode resource is
  187.                set to XmPOSITION_PROPORTIONAL, this resource
  188.                determines the position of the arc at the point it
  189.                leaves the "to" node. Values are given in percentages
  190.                of the relevant node size, and can range from 0-100.
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                         (printed 10/24/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      SSSSggggAAAArrrrcccc((((3333XXXX))))                 UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                 SSSSggggAAAArrrrcccc((((3333XXXX))))
  203.  
  204.  
  205.  
  206.      IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS
  207.           The following resources are inherited from the named
  208.           superclasses:
  209.                                           CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  210.              NNNNaaaammmmeeee                  CCCCllllaaaassssssss                TTTTyyyyppppeeee              DDDDeeeeffffaaaauuuulllltttt          AAAAcccccccceeeessssssss
  211.      ____________________________________________________________________________________________
  212.      XmNaccelerators        XmCAccelerators        XtTranslations   NULL                   CSG
  213.      XmNancestorSensitive   XmCSensitive           Boolean          True                   G
  214.      XmNbackground          XmCBackground          Pixel            dynamic                CSG
  215.      XmNbackgroundPixmap    XmCPixmap              Pixmap           XmUNSPECIFIED_PIXMAP   CSG
  216.      XmNcolormap            XmCColormap            Colormap         XtCopyFromParent       CG
  217.      XmNdepth               XmCDepth               int              XtCopyFromParent       CG
  218.      XmNdestroyCallback     XmCCallback            XtCallbackList   NULL                   C
  219.      XmNmappedWhenManaged   XmCMappedWhenManaged   Boolean          True                   CSG
  220.      XmNscreen              XmCScreen              Pointer          XtCopyScreen           CG
  221.      XmNsensitive           XmCSensitive           Boolean          True                   CSG
  222.      XmNtranslations        XmCTranslations        XtTranslations   NULL                   CSG
  223.  
  224.  
  225.  
  226.  
  227.         CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
  228.           See SgGraph(3x)
  229.  
  230.  
  231.      UUUUTTTTIIIILLLLIIIITTTTYYYY FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  232.           Widget SSSSggggCCCCrrrreeeeaaaatttteeeeAAAArrrrcccc (_g_r_a_p_h, _n_a_m_e, _a_r_g_s, _n__a_r_g_s)
  233.             XwGraphWidget  _g_r_a_p_h;
  234.             char           _n_a_m_e;
  235.             ArgList          _a_r_g_s;
  236.             int              _n__a_r_g_s;
  237.  
  238.           A convenience function that creates an SgArc widget named
  239.           _n_a_m_e whose parent is _g_r_a_p_h.
  240.  
  241.           Widget SSSSggggCCCCrrrreeeeaaaatttteeeeAAAAttttttttaaaacccchhhheeeeddddAAAArrrrcccc (_g_r_a_p_h, _n_a_m_e, _f_r_o_m, _t_o, _a_r_g_s,
  242.           _n__a_r_g_s)
  243.             XwGraphWidget  _g_r_a_p_h;
  244.             char           _n_a_m_e;
  245.             Widget          _f_r_o_m;
  246.             Widget          _t_o;
  247.             ArgList          _a_r_g_s;
  248.             int              _n__a_r_g_s;
  249.  
  250.           SSSSggggCCCCrrrreeeeaaaatttteeeeAAAAttttttttaaaacccchhhheeeeddddAAAArrrrcccc creates an arc from _f_r_o_m to _t_o with
  251.           arguments _a_r_g_s, name _n_a_m_e, and returns its widget ID.  _f_r_o_m
  252.           and _t_o must be node widgets in _g_r_a_p_h.  Returns NULL if not
  253.           successful.
  254.  
  255.           Widget SSSSggggAAAArrrrccccGGGGeeeettttPPPPoooossss (_a_r_c, _x_1, _y_1, _x_2, _y_2)
  256.             SgArcWidget  _a_r_c;
  257.             Position      *_x_1, *_y_1, *_x_2, *_y_2;
  258.  
  259.  
  260.  
  261.      Page 4                                         (printed 10/24/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      SSSSggggAAAArrrrcccc((((3333XXXX))))                 UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                 SSSSggggAAAArrrrcccc((((3333XXXX))))
  269.  
  270.  
  271.  
  272.           SSSSggggAAAArrrrccccGGGGeeeettttPPPPoooossss returns the coordinates of the endpoints of the
  273.           given arc.
  274.  
  275.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  276.           CCCCoooommmmppppoooossssiiiitttteeee((((3333XXXX)))), CCCCoooonnnnssssttttrrrraaaaiiiinnnntttt((((3333XXXX)))), CCCCoooorrrreeee((((3333XXXX)))), XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr((((3333XXXX)))),
  277.           SSSSggggGGGGrrrriiiidddd((((3333XXXX)))),
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                         (printed 10/24/98)
  328.  
  329.  
  330.  
  331.